/**
 * @param {Egg.Application} app - egg application
 */
module.exports = (app) => {
  const { router, controller, jwt } = app;
  router.get("/", controller.home.index);

  router.post("/user/login", controller.user.login);
  router.post("/user/verify", controller.user.verify);
  router.get("/user/list", controller.user.list);
  router.post("/user/update", controller.user.update);
  router.post("/user/create", controller.user.create);
  router.post("/user/delete", controller.user.delete);

  router.get("/manager/list", controller.manager.list);
  router.post("/manager/update", controller.manager.update);
  router.post("/manager/create", controller.manager.create);
  router.post("/manager/delete", controller.manager.delete);
  router.post("/manager/import", controller.manager.import);
  router.get("/manager/detail", controller.manager.detail);

  router.get("/manager-frame/list", controller.managerFrame.list);
  router.get("/manager-frame/detail", controller.managerFrame.detail);
  router.get("/manager-frame/event/list", controller.managerFrame.eventList);

  router.get("/event/list", controller.event.list);
  router.post("/event/update", controller.event.update);
  router.post("/event/create", controller.event.create);
  router.post("/event/delete", controller.event.delete);
  router.get("/event/detail", controller.event.detail);

  router.get("/event/logs", controller.log.list);

  router.post("/data/main", controller.data.index);

  router.post("/attachment/upload", controller.attachment.upload);
  router.post("/attachment/update", controller.attachment.update);
};
